package com.mrjy.queries.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mrjy.common.entity.UserQuestionRel;
import com.mrjy.queries.bo.IUserQuestionRelBo;
/**
 * 用户-问题关联表（用于统计用户看了视频）
 * @author csshui
 *
 */
@Controller
@RequestMapping("/queries/userQuestionRel")
public class UserQuestionRelController {
	@Resource
	private IUserQuestionRelBo userQuestionRelBo;
	
	@RequestMapping("/insert")
	@ResponseBody
	public Object insert(UserQuestionRel rel) {
		return userQuestionRelBo.txInsert(rel);
	}	
		
	@RequestMapping("/updateById")
	@ResponseBody
	public Object updateById(UserQuestionRel rel) {
		return userQuestionRelBo.txUpdateById(rel);
	}	
	
	@RequestMapping("/queryByUserIdAndQuestionId")
	@ResponseBody
	public Object queryByUserIdAndVideoId(UserQuestionRel rel) {
		return userQuestionRelBo.queryByUserIdAndQuestionId(rel);
	}
}
